
import { request } from '@/service/request';
import type { Backend } from '@/service/backend';
export const StatusApi = {
    status: "/check/car",
    imagefrontData: "/check/front/picture",
    imagebackData:"/check/back/picture"
}

export const postExit = async (msg: string) => {
    const res = await request.post<Backend.StdRsp>(StatusApi.status, {
        msg
    });
    console.log("check/car");
    console.log(res.my_list)
    return {  
        my_list: res.my_list,  
        beforeTest: res.beforeTest,  
        result: res.result,  
    }; 
}

export const getImageData = async () => {
    const res: any = await request.get(StatusApi.imagefrontData);
    const blob = new Blob([res]);
    const url = window.URL.createObjectURL(blob);
    console.log("url:", url)
    return url
}
